package cn.school.test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.school.dao.StudentDao;
import cn.school.util.MyBatisUtil;
import cn.shcool.entity.Student;

public class StudentTest4 {

	public static void main(String[] args) {
		// 查询部分列
		SqlSession session = MyBatisUtil.get();

		StudentDao dao = session.getMapper(StudentDao.class);
		List<Student> list = dao.paging3(2, 5, "stuno", "sname", "wechat");
		for (Student stu : list) {
			System.out.println(stu);// like '%${name}%'==like '%zhangsan%'
		}
		list = dao.paging3(2, 5, "stuno", "sname", "wechat", "telephone", "birthday");
		for (Student stu : list) {
			System.out.println(stu);// like '%${name}%'==like '%zhangsan%'
		}
		MyBatisUtil.close(session);
	}

}